Skip to main content

CNC Example 05: Creating CNC from a File

See the CNC05_File.project sample project in the installation directory of CODESYS under ..\CODESYS SoftMotion\Examples.

With this sample project, you can understand how a G code program is read from an ASCII file that is stored on the PLC. Using this kind of file makes sense when the G code program is very large.

The function of the project is similar to the CNC02_online.project sample project. However, the G code program is read from an ASCII file. No variables are used and the processing order is comparable to the one in the CNC02_online.project sample project.

The following differences can be determined:

  1. Additional virtual drive (z-axis)

  2. Function block smoothpath not required

  3. G code read from file

  4. Preprocessing online (see CNC02_online.project)